<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>Document</title>
	</head>
	<body>
		<script type="text/javascript" >
			let a = 'name'
			let b = 'age'
			let obj = {} 
			obj[a] = '张三'
			obj[b] = 18
		</script>
	</body>
</html>